package com.java.design;

//抽象类实现Targetable
abstract class TargetAbstract implements Targetable {
	public void method1() {
		System.out.println("TargetAbstract:method1");
	};

	public void method2() {
		System.out.println("TargetAbstract:method2");
	};
}

//类1重写抽象类的部分方法
class Source1 extends TargetAbstract {
	public void method1() {
		System.out.println("Source1中的method1");
	}
}

//类2重写抽象类的部分方法
class Source2 extends TargetAbstract {
	public void method2() {
		System.out.println("Source1中的method2");
	}
}

public class AdapterModeInterface {
	public static void main(String[] args) {
		Source1 source1 = new Source1();
		source1.method1();
		source1.method2();

		Source2 source2 = new Source2();
		source2.method1();
		source2.method2();
	}
}
